package com.treasure.hunt.mode

import android.app.Application
import androidx.lifecycle.MutableLiveData
import com.blankj.utilcode.util.LogUtils
import com.module.lemlin.base.BaseViewModel
import com.module.lemlin.mode.ViewModelSubscribe
import com.module.lemlin.rxhttp.HttpServiceData
import com.module.lemlin.rxhttp.HttpServiceResponse
import com.treasure.hunt.api.*
import com.treasure.hunt.entity.*
import io.reactivex.rxjava3.disposables.Disposable

class GridViewMode(application: Application) : BaseViewModel(application) {

    val luckyRankingLiveData = MutableLiveData<HttpServiceResponse<LuckyRankingResponse>>()
    val otherImageLiveData = MutableLiveData<HttpServiceResponse<OtherImageResponse>>()

    fun luckyTurntableRanking() {
        val disposable: Disposable =
            luckyTurntableRanking(ViewModelSubscribe(luckyRankingLiveData))
        dispose.add(disposable)
    }

    fun otherGetImage(name: String) {
        val disposable: Disposable =
            otherGetImage(name, ViewModelSubscribe(otherImageLiveData))
        dispose.add(disposable)
    }
}